<%@page import="br.com.fiap.vo.UsuarioVO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%
    
    UsuarioVO usuarioVO = (UsuarioVO)request.getSession().getAttribute("usuario");
    if(usuarioVO == null)
        response.sendRedirect(request.getContextPath()+"/index.jsp?msg=Acesso negado!");
    
    
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Cadastro de Curso</title>
        <link href="./css/avaliacao.css" rel="stylesheet" type="text/css" />
         <script type="text/javascript">
            function goBack(){
                window.history.back()
            }
            function confirmar(){
               var curso = document.getElementById("curso").value;
                                                
                if(curso.trim() == ""){
                    alert("Informe Nome do Curso a ser Cadastrado! ");
                    document.getElementById("curso").focus();
                    return false;
                }
               document.formCurso.submit();

            }
        </script>
    </head>
    <body>
        <form name="formCurso"  method="post" action="administrador">
            <input type="hidden" id="acao" name="acao" value="cadastroCurso"/>
            <table  class="tabela_input">
                <tr>
                    <td>Nome Curso: </td>
                    <td><input type="text" id="curso"  name="curso" value=""/></td>
                </tr>                
            </table>
            <table  align="center">
                <tr>
                    <td><a href="#" onclick="javaScript:goBack();">Voltar</a></td>
                    <td><a href="#" onclick="javaScript:confirmar();">Confirmar</a></td>
                </tr>            
            </table>  
        </form>
    </body>
</html>
